﻿namespace KingerRobot.MexicoSailunWMS.SpiService;
internal interface IProdMaterial
{
    /// <summary>
    /// 得到所有物料
    /// </summary>
    /// <returns></returns>
    List<POProdMaterial> GetAllMaterialList();
    /// <summary>
    /// 修改启用标识
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    int UpdateMaterialUseFlagById(long id);
    /// <summary>
    /// 创建物料
    /// </summary>
    /// <param name="materialCode">物料编号</param>
    /// <param name="materialName">物料名称</param>
    /// <returns></returns>
    POProdMaterial CreateMaterial(string materialCode, string materialName);
    /// <summary>
    /// 查找物料
    /// </summary>
    /// <param name="materialCode">物料编号</param>
    /// <returns></returns>
    POProdMaterial GetMaterialByCode(string materialCode);
    /// <summary>
    /// 查找所有物料
    /// </summary>
    /// <returns></returns>
    List<POProdMaterial> GetMaterialList();
    /// <summary>
    /// 获取物料信息
    /// </summary>
    /// <param name="ids"></param>
    /// <returns></returns>
    List<POProdMaterial> GetMaterialListByIds(List<long?> ids);
    /// <summary>
    /// 修改物料过期时间（小时）
    /// </summary>
    /// <param name="id">物料Id</param>
    int UpdateMaterialById(long id, int expir);
    /// <summary>
    /// 根据物料id获取物料信息
    /// </summary>
    /// <param name="materialId">物料ID</param>
    /// <returns></returns>
    POProdMaterial GetMaterialById(long materialId);
    /// <summary>
    /// 物料入库比例
    /// </summary>
    /// <param name="id"></param>
    /// <param name="ration">比例</param>
    /// <returns></returns>
    int UpdateMaterialCheckById(long id, int ration);

    /// <summary>
    /// 物料内外径和胎高
    /// </summary>
    /// <param name="condition"></param>
    /// <returns></returns>
    int UpdateMaterialPropertyById(UpdateMaterialPropertyCondition condition);
    /// <summary>
    /// 通过mesId查找物料
    /// </summary>
    /// <param name="mesId">mesId</param>
    /// <returns></returns>
    POProdMaterial GetMaterialByMesId(string mesId);

    List<MaterialCuringInfo> GetMaterialCuringList(decimal num);

    List<StockMaterialCount> GetStockMaterialCountList();
}
public class MaterialGroupCount
{
    public string MaterialCode { get; set; }
    public int Count { get; set; }
}

